Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Lightning packaging to follow the PEP 517/518/621/660 standards #832

Merged
merged 82 commits into from
Aug 12, 2024

Conversation

AmintorDusko
Copy link
Contributor

@AmintorDusko AmintorDusko commented Aug 1, 2024

Context: This PR updates the Lightning Python packaging to the latest standard. This allows us to eliminate pip~=22.0 from requirements*.txt, comply with up-to-date build practices, and fix the inability to build Lightning in place on newer Python environments.

Description of the Change: Most of the building configuration was moved to the pyproject.toml file. We kept the setup.py file working with setuptools in part of the configuration pre-processing. A script with some pre-pre-processing was added to configure the pyproject.toml file for each backend.

Benefits: Follow the new standard. Allows the use of more up-to-date pip versions. There will be no impact on the final user, as the installation of the wheels is unaffected by the change in packaging.

Possible Drawbacks: When building and installing Lightning backends from scratch, we need to run the configuration script. If not the installation will default to lightning.qubit, or the last configuration.

Related GitHub Issues:

[sc-65227]

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.50%. Comparing base (d6f681d) to head (337ed82).
Report is 86 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (d6f681d) and HEAD (337ed82). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (d6f681d) HEAD (337ed82)
12 9
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #832       +/-   ##
===========================================
- Coverage   97.73%   83.50%   -14.23%     
===========================================
  Files         205       32      -173     
  Lines       26419     2298    -24121     
  Branches      608        0      -608     
===========================================
- Hits        25820     1919    -23901     
+ Misses        599      379      -220     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AmintorDusko AmintorDusko added the ci:build_wheels Activate wheel building. label Aug 8, 2024
Copy link
Contributor

@vincentmr vincentmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @AmintorDusko .

docker/Dockerfile Show resolved Hide resolved
Copy link
Member

@mlxd mlxd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick comment or two, but happy to approve this -- great job!

.github/workflows/wheel_linux_x86_64_cuda.yml Show resolved Hide resolved
.github/workflows/wheel_noarch.yml Outdated Show resolved Hide resolved
@AmintorDusko AmintorDusko added the urgent Mark a pull request as high priority label Aug 12, 2024
@AmintorDusko AmintorDusko removed the urgent Mark a pull request as high priority label Aug 12, 2024
@AmintorDusko AmintorDusko merged commit de1dc09 into master Aug 12, 2024
103 of 104 checks passed
@AmintorDusko AmintorDusko deleted the update/Lightning_packaging branch August 12, 2024 21:41
multiphaseCFD pushed a commit that referenced this pull request Aug 13, 2024
#832)

**Context:** This PR updates the Lightning Python packaging to the
latest standard. This allows us to eliminate pip~=22.0 from
requirements*.txt, comply with up-to-date build practices, and fix the
inability to build Lightning in place on newer Python environments.

**Description of the Change:** Most of the building configuration was
moved to the ``pyproject.toml`` file. We kept the ``setup.py`` file
working with setuptools in part of the configuration pre-processing. A
script with some pre-pre-processing was added to configure the
``pyproject.toml`` file for each backend.

**Benefits:** Follow the new standard. Allows the use of more up-to-date
pip versions. There will be no impact on the final user, as the
installation of the wheels is unaffected by the change in packaging.

**Possible Drawbacks:** When building and installing Lightning backends
from scratch, we need to run the configuration script. If not the
installation will default to ``lightning.qubit``, or the last
configuration.

**Related GitHub Issues:**

[sc-65227]

---------

Co-authored-by: ringo-but-quantum <[email protected]>
Co-authored-by: Lee James O'Riordan <[email protected]>
Co-authored-by: Vincent Michaud-Rioux <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:build_wheels Activate wheel building.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants